import {request} from "../../request/index"

Page({
   data:{
       swiperList:[],
       cateList:[],
       floorList:[]
   },
   onLoad:function(options){
     this.getSwiperList();
     this.getCateList();
     this.getFloorList()
   },
   getSwiperList(){
       request({
           url:'/home/swiperdata'
       }).then(res=>{
           this.setData({
               swiperList:res
           })
       })
   },
   getCateList(){
       request({
           url:'/home/catitems'
       }).then(res=>{
           this.setData({
            cateList:res
           })
       })
   },
   getFloorList(){
       request({
           url:'/home/floordata'
       }).then(res=>{
           console.log(res)
           this.setData({
               floorList:res
           })
       })
   }

})